<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 
		 before
		 -->
		<h3>prepend()方法前追加内容</h3>
		<h3>prependTo()方法前追加内容</h3>
		<h3>append()方法后追加内容</h3>
		<h3>appendTo()方法后追加内容</h3>
		
		<span class="red">男神</span>
		<span class="blue">偶像</span>
		<div class="green">
			<span>小鲜肉</span>
		</div>
		
	</body>
	<script src="js/jquery-3.5.1.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		// $(".blue").prepend('<span class="yellow">渣男</span>');
		
		var span1="<span>渣男</span>";
		$(span1).prependTo($(".blue"));
		
		$(".blue").prependTo($(".red"));
		$(".blue").before($(span1));
		
	</script>
</html>
